package com.woniu.model.medicalService.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

//医院表
@Getter
@Setter
@TableName("ms_hospital")
@ApiModel(value = "Hospital对象", description = "医院表")
@Document(indexName = "hospitals")
public class Hospital implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @ApiModelProperty("医院表")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Field(analyzer = "ik_max_word", type = FieldType.Text)
    @ApiModelProperty("医院名称")
    private String name;

    @Field(analyzer = "ik_smart", type = FieldType.Text)
    @ApiModelProperty("医院简介")
    private String synopsis;

    @Field(type = FieldType.Keyword)
    @ApiModelProperty("医院头像")
    private String imgUrl;

    @Field(type = FieldType.Double)
    @ApiModelProperty("是否上架(字典)")
    private Long boole;

    @Field(type = FieldType.Double)
    @ApiModelProperty("医院类型(字典)")
    private Long type;

    @Field(type = FieldType.Double)
    @ApiModelProperty("医院等级(字典)")
    private Long grade;

    @Field(type = FieldType.Double)
    @ApiModelProperty("医院科室(外键)")
    private Long departmentId;


}
